

#ifndef SNL_FILEWRITER_H

#define SNL_FILEWRITER_H


#include<fstream>
#include<iostream>
using namespace std;

enum WRITERTYPE
{
	console =0,
	file =1,
	all =2
};


class FileWriter
{
public:
	
	//constructor
	FileWriter(WRITERTYPE wt,char* fn);
	
	//append string to the file or the buffer stream
	void appendTo(char* str);
	
	
private:
	
	
	bool m_writeToConsole(char* str);
	bool m_writeToFile(char* str);
	
	WRITERTYPE writertype;
	ofstream outfile;
	char* fileName;
};

#endif

